﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace examprojekt09
{
    class Crudbackend
    {
        private static Crudbackend instance;

        private Crudbackend() { }

        public static Crudbackend Instance
        {
            get
            {
                if (instance == null)
                {
                    instance = new Crudbackend();
                }
                return instance;
            }
        }

        
        public List<Employee> getEmployees()
        {
            Employee employee1 = new Employee(1, "Martin d.", "mgo@abe.dk", 1);
            Employee employee2 = new Employee(2, "Tejs", "tj@abe.dk", 1);
            Employee employee3 = new Employee(3, "Peter", "pek@abe.dk", 1);
            Employee employee4 = new Employee(4, "Martin b.", "latte@abe.dk", -1);
            List<Employee> empList = new List<Employee>();
            empList.Add(employee1);
            empList.Add(employee2);
            empList.Add(employee3);
            empList.Add(employee4);
            return empList;
        }
        public void createEmployee(int id, string name, string email, int pid)
        {
            Employee employee = new Employee(id, name, email, pid);
            List<Employee> empList = new List<Employee>();
            empList.Add(employee);
        }



    }
}
